In [2]:
# Importing
import theano.tensor as T
import sys, os
sys.path.append("../GeMpy")
sys.path.append("../pygeomod")
import GeMpy_core
import Visualization
import importlib
importlib.reload(GeMpy_core)
importlib.reload(Visualization)
import numpy as np
import pandas as pn
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt
os.environ['CUDA_LAUNCH_BLOCKING'] = '1'
np.set_printoptions(precision = 6, linewidth= 130, suppress = True)
%matplotlib inline
#%matplotlib notebook
In [3]:
carbonates = GeMpy_core.GeMpy()
In [9]:
carbonates.import_data( 3405750.7,3486330.0,5816244.1,5906512.6,-4917.7, -3118.861398, 100,100,100,
path_f = None,
path_i = os.pardir+"/input_data/wells2_1711.csv", sep = ",")
carbonates.Data.Foliations = pn.DataFrame(np.array([3445063.98, 5863089.02, -3778.800000,90,0,1,1]).reshape(1,7),
columns=['X', 'Y', 'Z', 'dip', 'azimuth', 'polarity', 'formation'])
carbonates.Data.Foliations["formation"] = "Top"
carbonates.Data.Foliations["series"] = "Deafult"
carbonates.Data.calculate_gradient()
carbonates.Data.Interfaces[["Z"]].max()
Out[9]:
In [5]:
carbonates.update_data()
In [6]:
# Create a class Grid so far just regular grid
carbonates.create_grid()
carbonates.Grid.grid
Out[6]:
In [7]:
carbonates.Plot.plot_data(direction="z")
In [149]:
# Learn about API authentication here: https://plot.ly/pandas/getting-started
# Find your api_key here: https://plot.ly/settings/api
import plotly.plotly as py
import plotly.graph_objs as go
import pandas as pd
df = carbonates.Data.Interfaces
df.head()
data = []
clusters = []
#colors = ['rgb(228,26,28)','rgb(55,126,184)','rgb(77,175,74)']
for i in range(len(df['formation'].unique())):
name = df['formation'].unique()[i]
x = df[ df['formation'] == name ]['X']
y = df[ df['formation'] == name ]['Y']
z = df[ df['formation'] == name ]['Z']
trace = dict(
name = name,
x = x, y = y, z = z,
type = "scatter3d",
mode = 'markers',
marker = dict( size=3, line=dict(width=0) ) )
data.append( trace )
layout = dict(
width=800,
height=550,
autosize=False,
title='MAx dataset',
scene=dict(
xaxis=dict(
gridcolor='rgb(255, 255, 255)',
zerolinecolor='rgb(255, 255, 255)',
showbackground=True,
backgroundcolor='rgb(230, 230,230)'
),
yaxis=dict(
gridcolor='rgb(255, 255, 255)',
zerolinecolor='rgb(255, 255, 255)',
showbackground=True,
backgroundcolor='rgb(230, 230,230)'
),
zaxis=dict(
gridcolor='rgb(255, 255, 255)',
zerolinecolor='rgb(255, 255, 255)',
showbackground=True,
backgroundcolor='rgb(230, 230,230)'
),
aspectratio = dict( x=1, y=1, z=0.2 ),
aspectmode = 'automatic'
),
)
fig = dict(data=data, layout=layout)
# IPython notebook
py.iplot(fig, filename='Max data', validate=False)
Out[149]:
In [23]:
carbonates.set_interpolator(u_grade = 0)
In [24]:
# Reset the block
carbonates.Interpolator.block.set_value(np.zeros_like(carbonates.Grid.grid[:,0]))
# Compute the block
carbonates.Interpolator.compute_block_model([0], verbose = 1)
In [25]:
carbonates.Plot.plot_block_section(direction="x", aspect ="auto" )
In [27]:
carbonates.Plot.plot_potential_field(50, direction="y")
In [20]:
carbonates.Interpolator.a_T.get_value()
Out[20]:
In [ ]: